using MicroMsg.Common.Utils;
using MicroMsg.Manager;
using MicroMsg.Plugin.Sns.Scene;
using MicroMsg.Storage;
using MicroMsg.UI.UserContrl;
using MicroMsg.UI.Util;
using Microsoft.Phone.Controls;
using System;
using System.Diagnostics;
using System.Windows;
using System.Windows.Controls;
namespace MicroMsg.UI.Page
{
	public class SnsTestMainPage : BasePage
	{
		internal Canvas canvas1;
		internal Button ClearAll;
		internal PhoneTextBox textBoxNum;
		internal Button post;
		internal Button Recycle;
		private bool _contentLoaded;
		public SnsTestMainPage()
		{
			this.InitializeComponent();
		}
		private void BasePage_Loaded(object sender, RoutedEventArgs e)
		{
		}
		private void ClearAll_Click(object sender, RoutedEventArgs e)
		{
			int num = StorageIO.filesNumber(StorageIO.getSnsPath());
			long timeSpan = DebugEx.getTimeSpan(0L);
			SnsRecycleMgr.ClearAll();
			MMMessageBox.Show(string.Concat(new object[]
			{
				"clear all finish time=",
				DebugEx.getTimeSpan(timeSpan),
				",del file num=",
				num
			}), true, "确定");
		}
		private void Post_Click(object sender, RoutedEventArgs e)
		{
			try
			{
				int count = int.Parse(this.textBoxNum.get_Text());
				SnsPostService.testPostTextObj(count);
			}
			catch (Exception)
			{
				MMMessageBox.Show("Count intput error", true, "确定");
			}
		}
		private void recycle_Click(object sender, RoutedEventArgs e)
		{
			long timeSpan = DebugEx.getTimeSpan(0L);
			SnsRecycleMgr.doRecycleStart(null);
			MMMessageBox.Show("recycle finish  time=" + DebugEx.getTimeSpan(timeSpan), true, "确定");
		}
		[DebuggerNonUserCode]
		public void InitializeComponent()
		{
			if (this._contentLoaded)
			{
				return;
			}
			this._contentLoaded = true;
			Application.LoadComponent(this, new Uri("/MicroMsg;component/Source/Plugin/Sns/Album/UI/SnsTestMainPage.xaml", 2));
			this.canvas1 = (Canvas)base.FindName("canvas1");
			this.ClearAll = (Button)base.FindName("ClearAll");
			this.textBoxNum = (PhoneTextBox)base.FindName("textBoxNum");
			this.post = (Button)base.FindName("post");
			this.Recycle = (Button)base.FindName("Recycle");
		}
	}
}
